package com.bailian.spring.ioc.assembly_02.config;

import com.bailian.spring.ioc.assembly_02.bean.Bar;
import com.bailian.spring.ioc.assembly_02.condition.ExistBossCondition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author gaoxu
 * date: Created on 2021/11/2 下午2:22
 */
@Configuration
public class BarConfiguration {

    @Bean
    @Conditional(ExistBossCondition.class)
    public Bar baar() {
        Bar bar = new Bar();
        return bar;
    }
}
